#coding: utf-8
'''
Created on 18/07/2013

@author: franÃ§ois
'''

lista = []
aux = 0

for i in range (8):
    lista.append(input())
    
    if lista[i] > aux:
        aux = lista[i]
    else:
        pass
    
print aux
